package com.one.group.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table("sp_user_account")
public class UserAccount implements Serializable {

    @Id(keyType = KeyType.Auto)
    @Column("id")
    private Long id;

    @Column("username")
    private String username;

    @Column("phone")
    private String phone;

    @Column("email")
    private String email;

    @Column("salt")
    private String salt;
    @Column("password")
    private String password;

    @Column("real_name")
    private String realName;

    @Column("gender")
    private Integer gender; // 注意：原字段名可能是拼写错误（gender）

    @Column("cell_id")
    private Long cellId;
    @Column("id_card")
    private String idCard;

    @Column("wechat_id")
    private String wechatId;

    @Column("avatar")
    private String avatar;

    @Column("login_count")
    private Integer loginCount;

    @Column("register_source")
    private Integer registerSource;

    @Column("remark")
    private String remark;
    @Column("status")
    private Integer status;

    @Column("update_time")
    private Date updateTime;

    @Column(tenantId = true)
    private Long tenantId;
}
